//
//  UIFont+Additions.m
//
//  Created by Jiaozl on 2022/1/29.
//  
//

#import "UIFont+Additions.h"

@implementation UIFont (Additions)

+(UIFont *)themeFontLight:(CGFloat)fontSize {
    UIFont *font = [UIFont fontWithName:@"PingFangSC-Light" size:fontSize];
    if (!font) {
        font = [UIFont systemFontOfSize:fontSize];
    }
    return font;
}

+(UIFont *)themeFontRegular:(CGFloat)fontSize {
    UIFont *font = [UIFont fontWithName:@"PingFangSC-Regular" size:fontSize];
    if (!font) {
        font = [UIFont systemFontOfSize:fontSize];
    }
    return font;
}

+(UIFont *)themeFontMedium:(CGFloat)fontSize {
    UIFont *font = [UIFont fontWithName:@"PingFangSC-Medium" size:fontSize];
    if (!font) {
        font = [UIFont boldSystemFontOfSize:fontSize];
    }
    return font;
}

+(UIFont *)themeFontSemibold:(CGFloat)fontSize {
    UIFont *font = [UIFont fontWithName:@"PingFangSC-Semibold" size:fontSize];
    if (!font) {
        font = [UIFont boldSystemFontOfSize:fontSize];
    }
    return font;
}

+(UIFont *)themeFontBold:(CGFloat)fontSize {
    UIFont *font = [UIFont fontWithName:@"PingFangSC-Bold" size:fontSize];
    if (!font) {
        font = [UIFont boldSystemFontOfSize:fontSize];
    }
    return font;
}

+(UIFont *)themeFontFZKai:(CGFloat)fontSize {
    UIFont *font = [UIFont fontWithName:@"FZKTJW--GB1-0" size:fontSize];
    if (!font) {
        font = [UIFont boldSystemFontOfSize:fontSize];
    }
    return font;
}

@end
